import request from '@/utils/request'

export function findListByPage(params) {
  return request({
    url: '/api/desensitizefieldlist/page',
    method: 'get',
    params
  })
}

export function findList() {
  return request({
    url: '/api/desensitizefieldlist/noPage',
    method: 'get'
  })
}

export function add(data) {
  return request({
    url: '/api/desensitizefieldlist',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: '/api/desensitizefieldlist' + '/' + ids,
    method: 'delete',
    ids
  })
}

export function disable(ids) {
  return request({
    url: '/api/desensitizefieldlist/disabled' + '/' + ids,
    method: 'put',
    ids
  })
}

export function reset() {
  return request({
    url: '/api/desensitizefieldlist/reset',
    method: 'get'
  })
}

export function upload(data) {
  return request({
    url: '/api/desensitizefieldlist/upload',
    data: data,
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data;boundary=' + new Date().getTime()
    }
  })
}

export default {findListByPage, findList, add, del, upload, reset, disable}
